package com.example.stlink.fragments;

import android.os.Bundle;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;

import com.example.stlink.R;
import com.example.stlink.configs.adapter.TeaDeleteCourseAdapter;
import com.example.stlink.model.domain.Course;

import java.util.List;

public class LeaveListFragment extends Fragment {
    private static RecyclerView rvCourseList;
    private static List<Course> coursesData;
    private static TeaDeleteCourseAdapter adapter;
    private static AppCompatActivity mAppCompatActivity;

    private int mPage = 1;
    private int mCurrentColIndex = 0;

    private static Bundle bundle;
    private static Handler handler;

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_sign_list, container, false);
        initView(view);
        return view;
    }

    /**
     * 堆外暴露的一个方法，用于获取该碎片实例
     * @param str 说明
     * @param appCompatActivity 上下文
     * @return 未结课的碎片实例
     */
    public static LeaveListFragment newInstance(String str, AppCompatActivity appCompatActivity){
        LeaveListFragment leaveListFragment = new LeaveListFragment();
        mAppCompatActivity = appCompatActivity;
        return leaveListFragment;
    }

    /**
     * 绑定控件，初始化实例等
     * @param view 当前视图
     */
    private void initView(View view) {

        rvCourseList = view.findViewById(R.id.rv_course_list);

        refreshData();

    }

    /**
     * 刷新数据
     */
    public static void refreshData(){


        getSignedList();
    }


    private static void getSignedList(){

    }
}
